public class Test1 {
    public static void main(String[] args) {

    }
    class Solution {
        public int massage(int[] nums) {
            if(nums == null || nums.length==0) return 0 ;
            int len = nums.length ;
            int[] dp = new int[len+2] ;
            dp[2] = nums[0] ;
            for(int i=3 ; i < dp.length ; i ++){
                dp[i] = nums[i-2] + Math.max(dp[i-2],dp[i-3]) ;
            }
            return Math.max( dp[dp.length-1] ,  dp[dp.length-2]) ;
        }
    }
}
